<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<!--[if lt IE 9]>
<script type="text/javascript" src="lib/html5.js"></script>
<script type="text/javascript" src="lib/respond.min.js"></script>
<script type="text/javascript" src="lib/PIE_IE678.js"></script>
<![endif]-->
<link href="${basePath}/public/lib/Hui-iconfont/1.0.1/iconfont.css" rel="stylesheet" type="text/css" />
<!--[if IE 6]>
<script type="text/javascript" src="http://lib.h-ui.net/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<title>接口管理</title>
<#include "lib/lib.html" />
<script type="text/javascript">
// alert('${(interfaceInfo.id)!''}')
function _save(){
	if($("[name='id']").val()==0){
		$("#interfaceForm").attr("action","${basePath}/intefaces/add.do");
	}else{
		$("#interfaceForm").attr("action","${basePath}/intefaces/update.do");
	}
	$("#interfaceForm").ajaxSubmit({
		dataType : "json",
		success:function(data){
			if(data.status=="success"){
             	window.parent.location.href="${basePath}/intefaces/getList.do?appId=77";
				/* window.parent.refreshInterfaceList($("#id").val()); */
				layer_close();
			}else{
				alert("提交失败");
			}
		}
	}); 
}
</script>
</head>
<body class="pos-r">
<div style="margin-left:150px;">
	<div>
		<form  method="post" class="form form-horizontal" id="interfaceForm" id="form-user-character-add">
			<input type="hidden" name="id" value="${(interfaceInfo.id)!''}"/>
			<input type="hidden" name="funId" value="${(interfaceInfo.funId)!''}"/>
			<input type="hidden" name="appId" value="${(interfaceInfo.appId)!''}"/>
			<div class="row cl">
				<label class="form-label col-2">接口名称：</label>
				<div class="formControls col-8">
					<input type="text" class="input-text" name="interfaceName" value="${(interfaceInfo.interfaceName)!''}" placeholder=""  nullmsg="接口名称不能为空">
				</div>
			</div>
			<div class="row cl">
				<label class="form-label col-2">请求类型：</label>
				<div class="formControls col-8">
					<span class="select-box" style="width: 100px;">
						<select id="select1" class="select" size="1" name="reqType" value="${(interfaceInfo.reqType)!''}">
							<option value="get">get</option>
							<option value="post">post</option>
						</select>
					</span>
				</div>
			</div>
			<div class="row cl">
				<label class="form-label col-2">请求url：</label>
				<div class="formControls col-8">
					<input type="text" class="input-text" name="reqUrl" value="${(interfaceInfo.reqUrl)!''}" placeholder=""  nullmsg="请求url不能为空">
				</div>
			</div>
			<div class="row cl">
				<label class="form-label col-2">接口描述：</label>
				<div class="formControls col-8">
					<input type="text" class="input-text" name="interfaceDesc" value="${(interfaceInfo.interfaceDesc)!''}" placeholder=""  nullmsg="接口描述不能为空">
				</div>
			</div>
			<div class="row cl">
			<div class="col-10 col-offset-2">
				<button type="button" onclick="_save()" class="btn btn-success radius" id="admin-role-save" name="admin-role-save"><i class="icon-ok"></i> 确定</button>
			</div>
		</div>
		</form>
	</div>
</body>
</html>